<?php

namespace app\librarys;


class ApiResponseCode
{
    const ExceptionCode = 1000;
    const ExceptionMessage = '系统错误';

    const AccountMissingCode = 1010;
    const AccountMissingMessage = '缺少认证账户信息';

    const TimestampMissingCode = 1020;
    const TimestampMissingMessage = '缺少时间戳信息';

    const TimestampInvalidCode = 1021;
    const TimestampInvalidMessage = '时间戳失效';

    const VerifyMissingCode = 1030;
    const VerifyMissingMessage = '缺少请求校验信息';

    const VerifyInvalidCode = 1031;
    const VerifyInvalidMessage = '请求校验信息失效';

    const SignMissingCode = 1040;
    const SignMissingMessage = '缺少签名信息';

    const SignAuthFailedCode = 1041;
    const SignAuthFailedMessage = '签名认证失败';

    const ParamSignMissingCode = 1050;
    const ParamSignMissingMessage = '缺少参数签名信息';

    const ParamSignAuthFailedCode = 1051;
    const ParamSignAuthFailedMessage = '参数签名认证失败';

    const ParamMissingCode = 1090;
    const ParamMissingMessage = '缺少参数';

    const ParamErrorCode = 1091;
    const ParamErrorMessage = '参数错误';

    const UserTicketErrorCode = 1100;
    const UserTicketErrorMessage = '用户ticket无效';

    const OtherErrorCode = 1099;
    const OtherErrorMessage = '';

    // 业务逻辑错误(从10000开始)
    const SmsVerificationCodeAuthFailedErrorCode = 10001;
    const SmsVerificationCodeAuthFailedErrorMessage = '短信验证码错误';

    const MerchantSessionErrorCode = 10002;
    const MerchantSessionErrorMessage = '商户信息出错，请重新登录';

    const UserSessionErrorCode = 10003;
    const UserSessionErrorMessage = '用户信息出错，请重新登录';

    const MerchantRegisterFailedErrorCode = 10010;
    const MerchantRegisterFailedErrorMessage = '商户注册失败';

    const MerchantRegisterPhoneUsedErrorCode = 10011;
    const MerchantRegisterPhoneUsedErrorMessage = '商户注册失败（注册使用手机号已经存在）';

    const MerchantLoginFailedErrorCode = 10012;
    const MerchantLoginFailedErrorMessage = '商户登录失败';

    const UserRegisterFailedErrorCode = 10020;
    const UserRegisterFailedErrorMessage = '用户注册失败';

    const UserRegisterPhoneUsedErrorCode = 10021;
    const UserRegisterPhoneUsedErrorMessage = '用户注册失败（注册使用手机号已经存在）';

    const UserLoginFailedErrorCode = 10022;
    const UserLoginFailedErrorMessage = '用户登录失败';
}